/*******************************************
 * little-endian（小端）
 * &hoge_p[0]..0x7ffeb950da1c hoge_p[0]..12 
 * &hoge_p[1]..0x7ffeb950da1d hoge_p[1]..34 
 * &hoge_p[2]..0x7ffeb950da1e hoge_p[2]..56 
 * &hoge_p[3]..0x7ffeb950da1f hoge_p[3]..78
 *
 * big-endian（大端）
 * &hoge_p[0]..0x7ffeb950da1c hoge_p[0]..78 
 * &hoge_p[1]..0x7ffeb950da1d hoge_p[1]..56 
 * &hoge_p[2]..0x7ffeb950da1e hoge_p[2]..34 
 * &hoge_p[3]..0x7ffeb950da1f hoge_p[3]..12
 *******************************************/

#include <stdio.h>

int main()
{
    int hoge              = 0x12345678;
	unsigned char *hoge_p = (unsigned char*)&hoge;

    printf("&hoge_p[0]..%p hoge_p[0]..%x \n", hoge_p, hoge_p[0]);
	printf("&hoge_p[1]..%p hoge_p[1]..%x \n", hoge_p + 1, hoge_p[1]);
	printf("&hoge_p[2]..%p hoge_p[2]..%x \n", hoge_p + 2, hoge_p[2]);
	printf("&hoge_p[3]..%p hoge_p[3]..%x \n", hoge_p + 3, hoge_p[3]);

    return 0;
}
